using FileLog;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging.Configuration;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddControllers();
builder.Logging.AddFile(opt=>opt.Configure(builder.Configuration.GetSection("Logging")));

//builder.Services.AddSingleton<ILogger, FileLogger>();
 // Clear default providers

//builder.Logging.AddProvider(new FileLoggerLoggerProvider(config, opt,new FileLoggingProcessor(opt)));
var app = builder.Build();

// Configure the HTTP request pipeline.

app.UseAuthorization();

app.MapControllers();

app.Run();
